import request from '@/config/axios'

export interface VenueTypeVO {
                    code: string
                    name: string
                    description: string
                    id: number
}

// 查询体育场地类型列表
export const getVenueTypePage = async (params) => {
  return await request.get({ url: '/vrs/venue-type/page', params })
}

// 查询体育场地类型详情
export const getVenueType = async (id: number) => {
  return await request.get({ url: '/vrs/venue-type/get?id=' + id })
}

// 新增体育场地类型
export const createVenueType = async (data: VenueTypeVO) => {
  return await request.post({ url: '/vrs/venue-type/create', data })
}

// 修改体育场地类型
export const updateVenueType = async (data: VenueTypeVO) => {
  return await request.put({ url: '/vrs/venue-type/update', data })
}

// 删除体育场地类型
export const deleteVenueType = async (id: number) => {
  return await request.delete({ url: '/vrs/venue-type/delete?id=' + id })
}

// 导出体育场地类型 Excel
export const exportVenueTypeApi = async (params) => {
  return await request.download({ url: '/vrs/venue-type/export-excel', params })
}

export const listVenueTypeDict = async () => {
  return await request.get({ url: '/vrs/venue-type/list-dict' })
}
